Skip to content

Conversation

robertky
Copy link
Member

Closes #101

What changed

  • Show the six highest-count artist countries first, preserving the server-provided order.
  • Add accessible Show more countries / Show fewer countries controls.
  • Keep selected countries visible while the list is collapsed, and return focus to the persistent Filters control if deselecting a country removes its checkbox.
  • Add tests for the preview, expansion/collapse, selection retention, and focus behavior.

What was tested

  • pnpm format:check
  • pnpm lint
  • pnpm typecheck
  • pnpm test — 207 client tests passed; 84 server tests passed. 56 PostgreSQL-backed tests were skipped because TEST_DATABASE_URL is unset locally.
  • pnpm build

@robertky robertky requested a review from a team as a code owner November 20, 2026 22:44
Copy link
Member

@erikhfj erikhfj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Clean, consistent implementation mirroring the existing genre preview pattern:

  • Shows the top 6 artist countries in the server-provided album-count order while keeping any selected countries outside the preview visible for deselection.
  • Generalizes .show-genres to .show-filter-options cleanly in FilterPanel.css.
  • Accessible Show more countries / Show fewer countries toggle with aria-controls="country-options", aria-expanded, keyboard support, and focus return when unchecking a selected country outside the collapsed preview.
  • Good test coverage in FilterPanel.test.tsx, and CI checks pass.

Two quick non-blocking notes:

  • Coordination with #109: Since #109 moves the panel into a <dialog> and switches the uncheck focus fallback from toggleRef to closeRef, whichever merges second will need to align the new country checkbox fallback to closeRef.
  • If AI assisted with this PR, remember to add a row in docs/AI-USAGE.md (either here or in a follow-up).

@erikhfj erikhfj merged commit 6f08000 into main Nov 22, 2026
3 checks passed
@erikhfj erikhfj deleted the feat/101-country-filter-show-more branch November 22, 2026 01:48
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add show more/less functionality to artist country filters
2 participants